IF (MYSQL_FOUND)
  SET (BINARY_NAME "pstress")
  ADD_SUBDIRECTORY(third_party)
  INCLUDE_DIRECTORIES(third_party/inih++/include third_party/rapidjson/include)
  IF (MARIADB)
    INCLUDE_DIRECTORIES( ${MYSQL_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR}/.. )
  ELSE()
    INCLUDE_DIRECTORIES( ${MYSQL_INCLUDE_DIR} )
  ENDIF(MARIADB)
  ADD_EXECUTABLE(${BINARY_NAME}-${PSTRESS_EXT} pstress.cpp help.cpp node.cpp thread.cpp random_test.cpp)
  TARGET_LINK_LIBRARIES( ${BINARY_NAME}-${PSTRESS_EXT} ${MYSQL_LIBRARY} ${OTHER_LIBS} inih++)
  INSTALL(TARGETS ${BINARY_NAME}-${PSTRESS_EXT} DESTINATION bin)
ENDIF(MYSQL_FOUND)
SET( CMAKE_EXPORT_COMPILE_COMMANDS ON )
